package edu.nanyang.hibernate;

import java.util.List;

import edu.nanyang.domain.Goods;
import edu.nanyang.util.QueryResult;

public interface IGoodsDao {
	public List<Goods> getGoodsByJingpaiUserid(int userId);
	public boolean updateGoods(Goods goods);
	public List<Goods> getGoodsUnvirified();
	public List<Goods> getGoodsByUserId(int userId);
	public boolean addGoods(Goods g);
	public Goods acquireGoodsById(int id);
	public long acquireTotalGoodsNumByCityID(int cityID);
	@SuppressWarnings("unchecked")
	public List acquireGoodsByCurrCityID(int cityID,int page,int pageSize);
	/**
	 * 
	 * @param buyOrSale 查询条件，求购还是出售
	 * @param schoolId 学校id
	 * @param goodsType 物品类型
	 * @param priceFrom 查询类型最低价
	 * @param priceTo 查询类型最高价
	 * @param lookOnlineOnly 是不是只看在线用户
	 * @param sortType 排序类型
	 * @param queryDays 设置查询时间范围
	 * @param queryStringdetail 设置精细查询条件
	 * @param page 当前页数
	 * @param pageSize 每页大小
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public QueryResult acquireGoodsByDetail(String buyOrSale,
											int schoolId,
											String goodsType,
											double priceFrom,
											double priceTo,
											boolean lookOnlineOnly,
											String sortType,
											String queryStringdetail,
											int queryDays,
											int page,
											int pageSize,
											int cityId);
}
